package com.xnfh.equipment.viewmodel

import com.xnfh.common.bean.GateWayBean
import com.xnfh.common.bean.WarningBean
import com.xnfh.equipment.viewmodel.base.BaseTokenViewModelRes
import com.xnfh.framework.bean.RespStateData
import com.xnfh.network.manager.ApiManager
import okhttp3.RequestBody

/**
 * @Description:
 * @Author: ziheng
 * @CreateDate: 2023/12/20 10:06
 * @UpdateUser: ziheng
 * @UpdateDate: 2023/12/20 10:06
 * @UpdateRemark: 更新说明
 */
class EquipmentViewModelRes : BaseTokenViewModelRes() {

    suspend fun requestWarningList(body: RequestBody, data: RespStateData<WarningBean>) = dealResp(
        { ApiManager.api.requestWarningList(body) }, data
    )

    suspend fun requestGetewayList(body: RequestBody, data: RespStateData<List<GateWayBean>>) =
        dealResp(
            { ApiManager.api.requestGetewayList(body) }, data
        )

}